package br.com.mestrefamiliar.familia;

import java.util.List;

import br.com.mestrefamiliar.util.DAOFactory;

public class FamiliaRN {
	
	public FamiliaDAO familiaDAO;
	
	public FamiliaRN(){
		this.familiaDAO = DAOFactory.criarFamiliaDAO();
	}
	
	public Familia carregar(Integer codigo){
		return this.familiaDAO.carregar(codigo);
	}
	
	public void salvar(Familia familia){
		this.familiaDAO.salvar(familia);
	}
	
	public void deletar(Familia familia){
		this.familiaDAO.equals(familia);
	}
	
	public List<Familia> listar(){
		return this.familiaDAO.listar();
	}
	
	public boolean verificaCadastro(String nome){
		return this.familiaDAO.verificaSeCadastrado(nome);
	}

}
